
#ifndef __DEV_DWLED_H__
#define __DEV_DWLED_H__

#include "sys_port.h"
#include "dev_off.h"
#include "dev_off_line.h"
#include "root.h"

typedef struct 
{
    char  devid[128];
    char  body[128];
}dwled_http_req_t;

typedef struct 
{
    char      devname[128];
    char      devid[128];
    char      devtype[128];
    char      devsubtype[128];

    int       status;
    int       onoff;

    int       brightness;
    int       min_bright;
    int       max_bright;

    int       color_temp;
    int       min_colortemp;
    int       max_colortemp;
}ui_dwled_data_t;


typedef struct 
{
    lv_obj_t* bg;
    lv_obj_t* bg_img;

    lv_obj_t* btn;
    lv_obj_t* btn_img;

    lv_obj_t* bar;
    lv_obj_t* bar_img;  
    lv_obj_t* bar_txt; 

    lv_obj_t* bar_w;
    lv_obj_t* bar_w_img;  
    lv_obj_t* bar_w_txt; 

    lv_timer_t* time;

    ui_dev_off_t      dev_off;
    ui_dev_off_line_t dev_off_line;
    
} ui_dwled_obj_t;

typedef struct 
{
    ui_dwled_data_t data;
    ui_dwled_obj_t  ui;
}ui_dev_dwled_t;

dev_info_t* dev_dwled_reg(ui_dwled_data_t* data);

page_info_t* dev_dwled_page_reg(ui_dev_dwled_t* dwled);

#endif
